package com.homework;

import java.util.Scanner;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/29 16:58
 * @description
 */
public class T1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个长度为8的字符串");
        String str = input.next();
        int length = str.length();
        if (length!=8){
            System.err.println("长度错误");
            return;
        }
        char[] chars = str.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            int aChar = chars[i];
            if (aChar>=65&&aChar<=90){
                chars[i] = 'M';
            }
        }
        for (char aChar : chars) {
            System.out.print(aChar+" ");
        }
    }
}
